package com.rayo.accesscontrollercopy.model.biz;

import android.content.Context;

import com.alibaba.fastjson.JSONObject;
import com.rayo.accesscontrollercopy.model.callback.ApiCallback;
import com.rayo.accesscontrollercopy.model.callback.OnGetDbListener;
import com.rayo.accesscontrollercopy.model.callback.OnNetworkListener;
import com.rayo.accesscontrollercopy.model.callback.OnUpdateDbListener;
import com.rayo.accesscontrollercopy.model.db.bean.HeartData;
import com.rayo.accesscontrollercopy.model.service.NetworkData;

import java.util.List;

/**
 * Created by yanghaojie on 16/7/25.
 */
public interface INetworkBiz {
    void init(OnGetDbListener onGetDbListener, OnNetworkListener onNetworkListener,
              OnUpdateDbListener onUpdateDbListener, ApiCallback apiCallback);

    void connect();

    void updateDb(String lockId);

    void updateOperator(HeartData heartData);

    void updateKeyTimezone(HeartData heartData);

    void updateCardTimezone(HeartData heartData);

    void updateCalendar(HeartData heartData);

    void updateDST(HeartData heartData);

    void updateBlackList(HeartData heartData);

    void updateLock(String lockId, int status);

    void updateKeyUser(List<String> keyList);

    void updateCardUser(List<String> cardList);

    void postEvents();

    void updateApp(Context context);

    void updateLocks(List<String>lockList);

    NetworkData saveData(byte cmd, JSONObject json);

}
